<?php
    require_once( './DButil.php' );
    sleep( 2 );
    $id = $_REQUEST['id'];
    $methodName = $_REQUEST['methodName'];
    $sql = "select p_id,p_name,p_price,p_unit,p_image_url from t_product where p_id = '{$id}'";
    $arr = query( $sql );
    $p = $arr[0];
    header( 'Content-Type:text/javascript;charset=utf-8' );
    echo $methodName.'(' .json_encode( $p ) . ')';// jsonp
?>